toInstant

public Instant toInstant()

Converts this Timestamp to an Instant.

Timestamp is based on microseconds, while Instant offers nanosecond precision. Since Timestamp is less precise, the conversion to Instant will not result in any loss of precision. The additional nanoseconds are simply set to zero.

Return

an instance of Instant that represents the same point in time as this Timestamp